﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Text;

namespace MixScript.BLL.SD
{
    public class cSupplier : cBaseBLL
    {
        public cSupplier()
        {
        }


        public string getSupNM(string supcode)
        {
            string sret = "";
            try
            {
                sret = Dbserver.ExecuteScalar("select top 1 bpidnm from vw_joid_supplier_v where codfbpid='"+supcode+"'").ToString();
                return sret;
            }
            catch (Exception ex)
            {

                return sret;
            }
        }
        public bool getSupp(string supcode, ref DataTable dt)
        {
            try
            {
                dt= new DataTable();
                //return getInquiry(ref dt,p

                string sql = "select * from vw_joid_supplier_v where codfbpid='" + supcode + "'";
                dt =Dbserver.ExecuteQuery(sql, "");

                return dt.Rows.Count > 0;


                

            }
            catch (Exception ex)
            {
                
                throw;
            }
        }


    }
}
